package com.daiyang.campus_lucky_draw.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum UserIdentityEnum {
    NORMAL("普通⽤⼾"),
    ADMIN("管理员⽤⼾");
    private final String message;
    public static UserIdentityEnum fromName(String name) {
        for (UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()) {
            if (userIdentityEnum.name().equalsIgnoreCase(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }
}
